</div>
{if $manage_footer==1}
<div class="tab-bottom">
	<div class="weui_tabbar">
		<a href="{php echo $this->createMobileUrl('manageform',array('weid' => $weid, 'id' => $reid))}" class="weui_tabbar_item {if $_GPC['status'] == ''}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-all"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">全部</p>
		</a>
		<a href="{php echo $this->createMobileUrl('manageform',array('weid' => $weid, 'id' => $reid, 'status'=>0))}" class="weui_tabbar_item {if $_GPC['status'] == '0'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-time"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'0'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('manageform',array('weid' => $weid, 'id' => $reid, 'status'=>1))}" class="weui_tabbar_item {if $_GPC['status'] == '1'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-service"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'1'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('manageform',array('weid' => $weid, 'id' => $reid, 'status'=>2))}" class="weui_tabbar_item {if $_GPC['status'] == '2'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-close"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'9'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('manageform',array('weid' => $weid, 'id' => $reid, 'status'=>3))}" class="weui_tabbar_item {if $_GPC['status'] == '3'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-check"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'3'))}</p>
		</a>
	</div>
</div>
{/if}
{if $user_footer==1}
<div class="tab-bottom">
	<div class="weui_tabbar">
		<a href="{php echo $this->createMobileUrl('Mydayu_form',array('weid' => $weid, 'id' => $reid))}" class="weui_tabbar_item {if $_GPC['status'] == ''}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-all"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">全部</p>
		</a>
		<a href="{php echo $this->createMobileUrl('Mydayu_form',array('weid' => $weid, 'id' => $reid, 'status'=>0))}" class="weui_tabbar_item {if $_GPC['status'] == '0'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-time"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'0'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('Mydayu_form',array('weid' => $weid, 'id' => $reid, 'status'=>1))}" class="weui_tabbar_item {if $_GPC['status'] == '1'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon f30" aria-hidden="true">
					<use xlink:href="#icon-service"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'1'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('Mydayu_form',array('weid' => $weid, 'id' => $reid, 'status'=>2))}" class="weui_tabbar_item {if $_GPC['status'] == '2'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-close"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'9'))}</p>
		</a>
		<a href="{php echo $this->createMobileUrl('Mydayu_form',array('weid' => $weid, 'id' => $reid, 'status'=>3))}" class="weui_tabbar_item {if $_GPC['status'] == '3'}weui_bar_item_on{/if}">
			<div class="weui_tabbar_icon">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-check"></use>
				</svg>
			</div>
			<p class="weui_tabbar_label">{php echo($this->get_status_name($reid,'3'))}</p>
		</a>
	</div>
</div>
{/if}
<?php
	$_share['title'] = !empty($_share['title']) ? $_share['title'] : $_W['account']['name'];
	$_share['imgUrl'] = !empty($_share['imgUrl']) ? $_share['imgUrl'] : '';
	if(isset($_share['content'])){
		$_share['desc'] = $_share['content'];
		unset($_share['content']);
	}
	$_share['desc'] = !empty($_share['desc']) ? $_share['desc'] : '';
	$_share['desc'] = preg_replace('/\s/i', '', str_replace('	', '', cutstr(str_replace('&nbsp;', '', ihtmlspecialchars(strip_tags($_share['desc']))), 60)));
	if(empty($_share['link'])) {
		$_share['link'] = '';
		$query_string = $_SERVER['QUERY_STRING'];
		if(!empty($query_string)) {
			parse_str($query_string, $query_arr);
			$query_arr['u'] = $_W['member']['uid'];
			$query_string = http_build_query($query_arr);
			$_share['link'] = $_W['siteroot'].'app/index.php?'. $query_string;
		}
	}
?>
	<script type="text/javascript">
	
	wx.config(jssdkconfig);
	
	var $_share = {php echo json_encode($_share);};
	
	if(typeof sharedata == 'undefined'){
		sharedata = $_share;
	} else {
		sharedata['title'] = sharedata['title'] || $_share['title'];
		sharedata['desc'] = sharedata['desc'] || $_share['desc'];
		sharedata['link'] = sharedata['link'] || $_share['link'];
		sharedata['imgUrl'] = sharedata['imgUrl'] || $_share['imgUrl'];
	}

	function tomedia(src) {
		if(typeof src != 'string')
			return '';
		if(src.indexOf('http://') == 0 || src.indexOf('https://') == 0) {
			return src;
		} else if(src.indexOf('../addons') == 0 || src.indexOf('../attachment') == 0) {
			src=src.substr(3);
			return window.sysinfo.siteroot + src;
		} else if(src.indexOf('./resource') == 0) {
			src=src.substr(2);
			return window.sysinfo.siteroot + 'app/' + src;
		} else if(src.indexOf('images/') == 0) {
			return window.sysinfo.attachurl+ src;
		}
	}
	
	if(sharedata.imgUrl == ''){
		var _share_img = $('body img:eq(0)').attr("src");
		if(_share_img == ""){
			sharedata['imgUrl'] = window.sysinfo.attachurl + 'images/global/wechat_share.png';
		} else {
			sharedata['imgUrl'] = tomedia(_share_img);
		}
	}
	
	wx.ready(function () {
		wx.onMenuShareAppMessage(sharedata);
		wx.onMenuShareTimeline(sharedata);
		wx.onMenuShareQQ(sharedata);
		wx.onMenuShareWeibo(sharedata);
	});
	{if $controller == 'site' && $action == 'site'}
		$('#category_show').click(function(){
			$('.head .order').toggleClass('hide');
			return false;
		});
		//文章点击和分享加积分
		{if !empty($_GPC['u'])}
			var url = "{php echo url('site/site/handsel/', array('id' => $detail['id'], 'action' => 'click', 'u' => $_GPC['u']), true);}";
			$.post(url, function(dat){});
		{/if}
		sharedata.success = function(){
			var url = "{php echo url('site/site/handsel/', array('id' => $detail['id'], 'action' => 'share'));}";
			$.post(url, function(dat){});
		}
	{/if}
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	{if $share==1}
	WeixinJSBridge.call('hideOptionMenu');
	{/if}
});
	</script>
</body>
</html>
